﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucRegister.ascx.cs" Inherits="ucControl_ucRegister" %>
<%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %>
<script language="javascript" type="text/javascript">
    function UpdateParentsLogin() {
        tb_remove();
        window.parent.location = "Error.aspx";
    }
</script>

<script type="text/javascript">
    function ValidateChecked(sender, args) {
        if ($('#<%= chkAccept.ClientID %>').attr('checked')) {
            $('#tdCheckboxAgree').removeClass("checkReq");
        }
        else {
            $('#tdCheckboxAgree').removeClass("checkReq");
            $('#tdCheckboxAgree').addClass("checkReq");
            args.IsValid = false;
        }
    }    
</script>

<style type="text/css">
    .checkReq
    {
        border: solid 1px black;
        background-color: #2187D9;
    }
</style>
<div id="Box">
    <div class="box2">
        <div class="bnt_close">
            <a href="#">
                <img src="images/login/bnt_close.png" width="50" height="50" /></a></div>
        <div class="boxW">
            <div class="boxT">
            </div>
            <div class="boxC">
                <asp:UpdatePanel ID="updatePnlReg" runat="server">
                    <ContentTemplate>
                        <asp:Panel ID="pnlRegister" runat="server" DefaultButton="cmdSubmit">
                            <table class="table_page" width="560px" cellpadding="0" cellspacing="1">
                                <tr>
                                    <td colspan="3">
                                        <h2 style="border-bottom: dashed 1px #bbb;">
                                            Đăng ký thành viên</h2>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3" class="tablecell1">
                                        <p>
                                            <strong>Đăng ký thành viên ii-online là miễn phí.</strong></p>
                                        <p>
                                            Khi bạn đăng ký, bạn có thể sử dụng các chức năng quản ký người dùng của trang web
                                            để theo dõi các đơn đặt hàng của bạn cũng như xem lịch sử mua...</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3" class="tablecell1">
                                        <p class="line">
                                        </p>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" style="padding-bottom: 5px; padding-top: 5px" colspan="3">
                                        <asp:Label ID="lblMessage" runat="server" Text="">
                                        </asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="127" class="tablecell1">
                                        Họ
                                    </td>
                                    <td colspan="2" class="tablecell1">
                                        <div class="img_login1">
                                            <asp:TextBox ID="txtHo" runat="server" class="textbox2"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="txtHo"
                                                runat="server" ErrorMessage="*" Display="Static" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="127" class="tablecell1">
                                        Tên
                                    </td>
                                    <td colspan="2" class="tablecell1">
                                        <div class="img_login1">
                                            <asp:TextBox ID="txtTen" runat="server" class="textbox2"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtTen"
                                                runat="server" ErrorMessage="*" Display="Static" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablecell1">
                                        Email đăng nhập
                                    </td>
                                    <td colspan="2" class="tablecell1">
                                        <div class="img_login1">
                                            <asp:TextBox ID="txtemail" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtemail"
                                                runat="server" ErrorMessage="*" Display="Static" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablecell1">
                                        Mật khẩu
                                    </td>
                                    <td colspan="2" class="tablecell1">
                                        <div class="img_login1">
                                            <asp:TextBox ID="txtPassword" runat="server" class="textbox2"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtPassword"
                                                runat="server" ErrorMessage="*" Display="Static" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablecell1">
                                        Nhập lại mật khẩu
                                    </td>
                                    <td colspan="2" class="tablecell1">
                                        <div class="img_login1">
                                            <asp:TextBox ID="txtRePassword" runat="server" class="textbox2"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtRePassword"
                                                runat="server" ErrorMessage="*" Display="Static" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
                                            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="Passwords do not match. "
                                                Display="Dynamic" ControlToCompare="txtPassword" ControlToValidate="txtRePassword"
                                                ValidationGroup="grpRegister"></asp:CompareValidator>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablecell1" colspan="3">
                                        <p class="line">
                                        </p>
                                    </td>
                                </tr>
                                <tr>
                                    <td rowspan="3" class="tablecell1">
                                        &nbsp;
                                    </td>
                                    <td width="205" class="tablecell1">
                                        <asp:UpdatePanel ID="updCap" runat="server">
                                            <ContentTemplate>
                                                <cc1:CaptchaControl ID="msCaptcha" runat="server" BorderWidth="1px" BorderStyle="Solid"
                                                    BorderColor="#5daeff" Width="185" FontColor="#007eb3" ForeColor="AliceBlue" NoiseColor="#237ceb"
                                                    CaptchaBackgroundNoise="Extreme" CaptchaLength="5" CaptchaHeight="50" CaptchaWidth="185"
                                                    CaptchaLineNoise="None" CaptchaMinTimeout="5" CaptchaMaxTimeout="240" LineColor="Yellow"
                                                    CaptchaFontWarping="Low" />
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>
                                    <td width="222" class="tablecell1">
                                        <asp:Label ID="lblInputCaptcha" runat="server" Text="Mã xác nhận:" Style="font-size: 12px;"></asp:Label><asp:UpdatePanel
                                            ID="updTxt" runat="server">
                                            <ContentTemplate>
                                                <asp:TextBox ID="txtCaptcha" runat="server" Width="100" CssClass="txtRegisterReq"
                                                    autocomplete="off" ToolTip="Mã xác minh"></asp:TextBox>&nbsp;<asp:RequiredFieldValidator
                                                        ID="regCaptcha" runat="server" ErrorMessage="" ToolTip="Nhap ma xác minh." ForeColor="Red"
                                                        ControlToValidate="txtCaptcha" SetFocusOnError="true" Text="*" ValidationGroup="grpRegister"></asp:RequiredFieldValidator></ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="lnkRefreshCaptcha" EventName="Click" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                        <asp:LinkButton ID="lnkRefreshCaptcha" runat="server" Text="Cập nhật mã xác minh"
                                            CausesValidation="false" Style="font-size: 12px;" OnClick="lnkRefreshCaptcha_Click"></asp:LinkButton>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" class="tablecell1">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablecell1" colspan="3">
                                        <p class="line">
                                        </p>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3">
                                        <table border="0" cellpadding="0" cellspacing="3" width="100%">
                                            <tr>
                                                <td id="tdCheckboxAgree" class="loginLnk">
                                                    <asp:CheckBox ID="chkAccept" runat="server" />
                                                    Tôi chấp nhận
                                                    <asp:HyperLink ID="lnkPolicy" runat="server" NavigateUrl="~/PrivacyPolicy .aspx">chính sách bảo mật</asp:HyperLink>
                                                    <asp:CustomValidator ClientValidationFunction="ValidateChecked" runat="server" ID="valchkAccept"
                                                        ValidationGroup="grpRegister" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:CheckBox ID="chkNewsletter" runat="server" Checked="true" />
                                                    Đăng ký bản tin trực tuyến trên ii-online .
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablecell1" align="center" colspan="3">
                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                            <ContentTemplate>
                                                <asp:ImageButton ID="cmdSubmit" runat="server" ToolTip="Register" ImageUrl="~/images/login/bnt_register.png"
                                                    OnClick="cmdSubmit_Click" ValidationGroup="grpRegister" />
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="cmdSubmit" EventName="Click" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tablecell1" align="center" colspan="3">
                                        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                                            <ProgressTemplate>
                                                <asp:Image ID="imgLoading" runat="server" ToolTip="Loading..." ImageUrl="~/images/loadingAnimation.gif"
                                                    Style="border-width: 0px;" Width="31px" />
                                            </ProgressTemplate>
                                        </asp:UpdateProgress>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <div class="boxB">
            </div>
        </div>
    </div>
</div>
